package com.huabo.contract.mysql.mapper;

import com.huabo.contract.mysql.entity.TblProcessAnalusisUserMySql;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huabo
 * @since 2021-10-26
 */
public interface TblProcessAnalusisUserMySqlMapper extends BaseMapper<TblProcessAnalusisUserMySql> {

	@Select("select * from TBL_PROCESS_ANALUSIS_USER where FROMID = #{fromid} and ANALID = #{analid}")
	TblProcessAnalusisUserMySql findOnd(@Param("analid")String analid,@Param("fromid") String fromid) throws Exception;

	void updateSetting(TblProcessAnalusisUserMySql analysisUser) throws Exception;

	@InsertProvider(method="insertSetting",type = TblProcessAnalusisUserMySqlMapperSqlConfig.class)
	void insertSetting(TblProcessAnalusisUserMySql analysisUser) throws Exception;

	@Select("SELECT * FROM TBL_PROCESS_ANALUSIS_USER where FROMID= #{fromid} and ANALID= #{analid}")
    List<TblProcessAnalusisUserMySql> listBySql(String analid, String fromid);

	@UpdateProvider(method="updateAnalysisUser",type=TblProcessAnalusisUserMySqlMapperSqlConfig.class)
	void updateAnalysisUser(TblProcessAnalusisUserMySql analysisUser);
}
